package com.zhglxt.oa.activitiListeners.taskListener;

import com.zhglxt.common.core.entity.sys.SysUser;
import com.zhglxt.system.service.ISysUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;

/**
 * @ClassName TestService
 * @Description 需要实现Serialzable接口
 * @Author moyongjun
 * @Date 2022/5/23 00:02
 * @Version 1.0
 **/
@Service("testService")
public class TestService implements Serializable {
    private final Logger logger= LoggerFactory.getLogger(TestService.class);
    @Autowired
    private ISysUserService userService;

    public String getUser(int myUserId){
        logger.info("TestService测试动态配置审批人：");
        logger.info("要查询的id是：{}",myUserId);
        // 模拟测试

        SysUser user=new SysUser();
        if (myUserId==27){
            user.setUserId("25");
            user.setUserName("test_项目经理_代玉秀");
        }
        if (myUserId==29){
            user.setUserId("28");
            user.setUserName("test_项目经理_红红");
        }
        if (myUserId==25){
            user.setUserId("23");
            user.setUserName("test_总经理_袁凤飞");
        }

        if (myUserId==23){
            user.setUserId("23");
            user.setUserName("test_总经理_袁凤飞");
        }

        String userId1 = user.getUserId();
        logger.info("查询到符合要求的id信息是：{}",userId1);
        logger.info("分配的任务人用户名是：{}",user.getUserName());
        return userId1  ;
    }
}
